package com.nhjf.model.coursePicture;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.nhjf.model.BaseModel;
import com.nhjf.model.coursesSeries.CoursesSeries;
import com.nhjf.model.teachers.Teacher;

@SuppressWarnings("serial")
@Entity
@Table(name = "coursePicture")
public class CoursePicture extends BaseModel{
	/**
	 * 主键
	 */
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "native")
	@Column(name = "id", unique = true)
	private Long id;
	
	/***
	 * 系列课id
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "coursesSeriesId")
	private CoursesSeries coursesSeries;
	/**
	 * 图片
	 */
	@Column(name = "imageUrl")
	private String imageUrl;
	/**
	 * 序号
	 */
	@Column(name = "serialNumber")
	private Integer serialNumber;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public CoursesSeries getCoursesSeries() {
		return coursesSeries;
	}
	public void setCoursesSeries(CoursesSeries coursesSeries) {
		this.coursesSeries = coursesSeries;
	}
	public String getImageUrl() {
		return imageUrl;
	}
	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}
	public Integer getSerialNumber() {
		return serialNumber;
	}
	public void setSerialNumber(Integer serialNumber) {
		this.serialNumber = serialNumber;
	}
	
}
